﻿@using JT.WEB.Areas.Identity.Data
@using JT.WEB.Models
@using JTWEB3.Models
@inject SignInManager<JTWEB3User> SignInManager
@inject UserManager<JTWEB3User> UserManager
    <link href="~/lib/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
<ul class="nav">
@if (SignInManager.IsSignedIn(User))
{
    <li class="nav-item">
        <a id="manage" class="nav-link text-white btn btn-link" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @UserManager.GetUserName(User)!</a>
    </li>
    <li class="nav-item">
        <form id="logoutForm" class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@Url.Action("Index", "Home", new { area = "" })">
            <button id="logout" type="submit" class="nav-link btn btn-link text-white">退出登陆</button>
        </form>
    </li>
}
else
{
    <li class="nav-item">
        <a class="nav-link text-white" id="register" asp-area="" asp-controller="Register" asp-action="Register">注册</a>
    </li>
    <li class="nav-item">
        <a class="nav-link text-white" id="login" asp-area="Identity" asp-page="/Account/Login">登陆</a>
    </li>
}
</ul>
